<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String channel = "wendang";
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Smooth Admin</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<%@ include file="/WEB-INF/view/include/_js.jspf"%>
	<script type="text/javascript">
		$(document).ready(function () {
			style_path = "<%=path %>/resources/css/colors";
			$("#date-picker").datepicker();
			$("#box-tabs, #box-left-tabs").tabs();
		});
		function topage(page){
			window.location.href="<%=request.getContextPath()%>/login/ab.html?currentPage="+page; 
		}
	</script>
</head>
<body>
<div id="colors-switcher" class="color">
	<a href="" class="blue" title="Blue"></a>
	<a href="" class="green" title="Green"></a>
	<a href="" class="brown" title="Brown"></a>
	<a href="" class="purple" title="Purple"></a>
	<a href="" class="red" title="Red"></a>
	<a href="" class="greyblue" title="GreyBlue"></a>
</div>
<!-- end dialogs -->
<%@ include file="/WEB-INF/view/include/header.jspf"%>
<!-- content -->
<div id="content">
	<!-- end content / left -->
	<%@ include file="/WEB-INF/view/include/left.jspf" %>
	<!-- end content / left -->
	<!-- content / right -->
	<div id="right">
		<div class="box">
					<!-- box / title -->
					<div class="title">
						<h5>文档列表</h5>
						<div class="search">
								<div class="">
									<a href="<%=path %>/document/list.html#wendang">
										<h5>返回根目录</h5>
									</a>
								</div>
						</div>
					</div>
					<!-- end box / title -->
					<div class="table">
						<table>
							<thead>
								<tr>
									<th>名称</th>
									<th>类型</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
							<c:forEach items="${directorys }" var="items">
								<tr>
									<td class="title">${items.key }</td>
									<td class="price">${items.value.type }</td>
									<td class="date">
									<c:if test="${items.value.type eq '文件夹' }">
										<a href="<%=path %>/document/list.html?path=${items.value.path}">
									</c:if><c:if test="${items.value.type eq '文件' }">
										<a href="<%=path %>/document/download.html?path=${items.value.path}&filename=${items.key }">
									</c:if>
											${items.value.type eq '文件夹' ? '进入' : '下载'}
										</a></td>
								</tr>
							</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
	</div>
	<!-- end content / right -->
</div>
<!-- end content -->
<!-- footer -->
<%@ include file="/WEB-INF/view/include/footer.jspf"%>
<!-- end footert -->
</body>
</html>